package com.example.demo04.entity;

import com.google.gson.Gson;
import lombok.Data;

import java.util.HashMap;
import java.util.Map;

/**
 * @author admin
 * @Description ${Description}
 * @date 2020-07-18 11:50:00
 */
@Data
public class Course {

    private String cId;

    private String cName;

    private String tId;

    public static void main(String[] args) {
        Map<String, Map<String, String>> map = new HashMap<>(16);
        Map<String, String> hashMap = new HashMap<>(16);
        hashMap.put("2", "2");
        map.put("1", hashMap);
        Map<String, String> stringMap = map.get("1");
        // 获取value值
        System.out.println("map = " + stringMap);
        String json = new Gson().toJson(map);
        System.out.println("json = " + json);
    }
}